//部门数据API  分支测试
import request from "@/utils/request.js";

//查询全部部门数据
export const getDeptListApi = () => {
  return request.get("/depts");
};

//新增
export const addDeptApi = (dept) => {
  return request.post("/depts", dept);
};

//根据ID查询部门
export const queryByIdApi = (id) => {
  return request.get(`/depts/${id}`);
};

//修改
export const updateByIdApi = (dept) => {
  return request.put("/depts", dept);
};
//删除
export const deleteByIdApi = (id) => {
  return request.delete(`/depts?id=${id}`);
};
